package com.xdf.teacher.MvcTest;

import com.xdf.teacher.http.APPURL;
import com.xdf.teacher.http.NetUtils;

import net.neiquan.okhttp.NetCallBack;
import net.neiquan.okhttp.ResultModel;

import java.util.Map;

/**
 * Created by JavaDog on 2018-4-17.
 */

public class MvcModelImp implements MvcModel {
    @Override
    public void getHttpInfo(Map<String, Object> params, String url, Object t, final MvcListener mvcListener) {
        NetUtils.getInstance().norPost(url, params, new NetCallBack() {
            @Override
            public void onSuccess(String response, String mssage, ResultModel model) {
                mvcListener.onSuccess(response);
            }

            @Override
            public void onFail(boolean dataError, int errorCode, String mssage) {
                mvcListener.onFailed();
            }
        }, t.getClass());
    }
}
